//
//  CBCReadModel.h
//  CBCReader
//
//  Created by Labanotation on 16/5/31.
//  Copyright © 2016年 okwei. All rights reserved.
//

#import <Foundation/Foundation.h>

@class BookInfo;
@class CBCMarkModel;
@class CBCRecordModel;
@class CBCChapterModel;
@class CBCNoteModel;
@interface CBCReadModel : NSObject<NSCoding>
@property (nonatomic,strong) BookInfo *bookInfo;
@property (nonatomic,strong) NSMutableArray <CBCChapterModel *>*chapters;
@property (nonatomic,strong) CBCRecordModel *record;
@property (nonatomic,strong) NSNumber *font;
-(instancetype)initWithBookInfo:(BookInfo *)bookInfo andChapters:(NSArray *)chapters;
-(instancetype)initWithContent:(NSString *)content;
-(instancetype)initWithePub:(NSString *)ePubPath;
-(NSUInteger)getPageIndexByOffset:(NSUInteger)offset Chapter:(NSUInteger)chapterIndex;
+(void)updateLocalModel:(CBCReadModel *)readModel key:(NSString *)key;
+(id)getLocalModelWithURL:(NSURL *)url;
@end
